diff options
author | Ciaran Gultnieks <ciaran@ciarang.com> | 2014-03-11 22:42:59 +0000 |
---|---|---|
committer | Ciaran Gultnieks <ciaran@ciarang.com> | 2014-03-11 22:50:48 +0000 |
commit | 9eda62df7b45659ff704db9a63a633a6bc4f70a7 (patch) | |
tree | bd686fcb12838c1fd95d7c3fe3be0585cc4c82e1 /mesecons_powerplant/�Could not read POST from stdin��Could not write POST to stdout��repo.enable-remote-branches=%d�[cgit] Error opening %s: %s (%d)�������[cgit] Error renaming %s to %s: %s (%d)��������<table class= | |
parent | a59f53d71aa580e03adce238158d7852866f922c (diff) |
Add timer() function/event (node timer based) to luacontroller
This adds a timer(<seconds>) function, which causes an event of type
"timer" to be fired after that many seconds has elapsed.
Because it's node timer based, it works properly across server restarts
and block unloading. Thus, simplest example, a blinky plant replacement
with a 10 second period:
if event.type == "program" then
timer(10)
elseif event.type == "timer" then
port.a = not port.a
timer(10)
end
Diffstat (limited to 'mesecons_powerplant/�Could not read POST from stdin��Could not write POST to stdout��repo.enable-remote-branches=%d�[cgit] Error opening %s: %s (%d)�������[cgit] Error renaming %s to %s: %s (%d)��������<table class=')
0 files changed, 0 insertions, 0 deletions